import chunk from './pathApi'
const router = [
  
  {
    path: '/home',    
    component: () => import('@pages/middleView.vue'),
    // component: () => import('@pages/Home/statistics/statistics.vue'),
    name: 'home',
    meta: {
      icon: 'md-home',
      title: "首页",
      sideBar: true,
      ifNocholdren:true,
      noAuthor: true //是否需要权限
    },
    redirect: 'home/statistics',
    children: [
      {
        path: 'statistics',
        name: 'statistics',
        component: () => import('@pages/Home/statistics/statistics.vue'),
        meta: {
          title: '首页',
          sideBar: false,
          parentPath: '/home',
          noAuthor: true //是否需要权限
        },
      },{
        path: 'customerVisit',
        name: 'customerVisit',
        component: () => import('@pages/Home/customerVisit/customerVisit.vue'),
        meta: {
          title: '客户来访统计',
          sideBar: false,
          parentPath: '/home',
          noAuthor: true //是否需要权限
        },
      },{
        path: 'ownershipPlan',
        name: 'ownershipPlan',
        component: () => import('@pages/Home/ownershipPlan/ownershipPlan.vue'),
        meta: {
          title: '置业计划书统计',
          sideBar: false,
          parentPath: '/home',
          noAuthor: true //是否需要权限
        },
      },{
        path: 'customerInfo',
        name: 'customerInfo',
        component: () => import('@pages/Home/customerInfo/customerInfo.vue'),
        meta: {
          title: '客户信息完善统计',
          sideBar: false,
          parentPath: '/home',
          noAuthor: true //是否需要权限
        },
      }, {
        path: 'customerFollow',
        name: 'customerFollow',
        component: () => import('@pages/Home/customerFollow/customerFollow.vue'),
        meta: {
          title: '客户跟进统计',
          sideBar: false,
          parentPath: '/home',
          noAuthor: true //是否需要权限
        },
      }      
    ]
  },
  
  

  // 客户管理
  {
    path: '/customerManagement_center',
    component: () => import('@pages/middleView.vue'),
    meta: {
      icon: 'ios-people',
      title: "客户管理",
      sideBar: true,
    },
    children: [{
      path: 'allCustomers/index',
      component: chunk.customerManagementCenter('allCustomersManagement/index.vue'),
      name: 'allCustomersManagement',
      meta: {
        auth: false,
        title: '全部客户',
        sideBar: true,
        keepAlive: true
      },
    }, {
      path: 'allCustomers/details',
      component: chunk.customerManagementCenter('allCustomersManagement/details.vue'),
      name: 'allCustomersDetails',
      meta: {
        auth: false,
        noAuthor: true, //是否需要权限
        title: '客户详情',
        parentPath: "/customerManagement_center/allCustomers/index"
      }
    }, {
      path: 'allCustomers/newCustomer',
      component: chunk.customerManagementCenter('allCustomersManagement/newCustomer.vue'),
      name: 'newCustomer',
      meta: {
        auth: false,
        noAuthor: true, //是否需要权限
        title: '新建客户',
        parentPath: "/customerManagement_center/allCustomers/index"
      }
    }, {
      path: 'allCustomers/assignCustomers',//分配客户
      component: chunk.customerManagementCenter('allCustomersManagement/assignCustomers.vue'),
      name: 'assignCustomers',
      meta: {
        auth: false,
        noAuthor: true, //是否需要权限
        title: '分配客户',
        parentPath: "/customerManagement_center/allCustomers/index"
      }
    }]
  },
  // 新楼盘管理
  {
    path: '/operationsCenter',
    component: () => import('@pages/middleView.vue'),
    meta: {
      icon: 'ios-podium',
      title: "楼盘管理",
      sideBar: true,
    },
    children: [{
        path: 'build',
        component: chunk.newOperationsCenter('build/index'),
        name: 'build',
        meta: {
          auth: false,
          title: '楼盘列表',
          sideBar: true
        },
      },
      {
        path: 'cityConfigurationList',
        component: () => import('@pages/operationsCenter/cityConfiguration/cityConfigurationList'),
        name: 'cityConfigurationList',
        meta: {
          auth: false,
          title: '城市配置列表',
          sideBar: true
        },
      },
      {
        path: 'cityConfigurationDetail',
        component: () => import('@pages/operationsCenter/cityConfiguration/cityConfigurationDetail'),
        name: 'cityConfigurationDetail',
        meta: {
          auth: false,
          title: '城市配置详情',
          sideBar: false,
          parentPath: "/operationsCenter/cityConfigurationList"
        },
      },
      {
        path: 'buildDetail',
        component: chunk.newOperationsCenter('build/detail'),
        name: 'buildDetail',
        meta: {
          auth: false,
          title: '楼盘详情',
          parentPath: '/operationsCenter/build'
        },
      },
      {
        path: 'materialManagement',
        component: () => import('@pages/middleView.vue'),
        meta: {
          auth: false,
          title: '素材管理',
          sideBar: true
        },
        children: [{
          path: 'articleManagement/index',
          component: chunk.newOperationsCenter('materialManagement/articleManagement/index'),
          name: 'articleManagement',
          meta: {
            auth: false,
            title: '文章管理',
            sideBar: true
          }
        }, {
          path: 'articleManagement/addEditArticlePage',
          component: chunk.newOperationsCenter('materialManagement/articleManagement/addEditArticlePage'),
          name: 'addEditArticlePage',
          meta: {
            auth: false,
            title: '新增文章',
            noAuthor: true, //是否需要权限
            parentPath: '/materialManagement/articleManagement/index'

          }
        }, {
          path: 'articleManagement/viewArticlePage',
          component: chunk.newOperationsCenter('materialManagement/articleManagement/viewArticlePage'),
          name: 'viewArticlePage',
          meta: {
            auth: false,
            title: '查看文章',
            parentPath: '/materialManagement/articleManagement/index'

          }
        }, {
          path: 'questionAnswerManagement/index',
          component: chunk.newOperationsCenter('materialManagement/questionAnswerManagement/index'),
          name: 'questionAnswerManagement',
          meta: {
            auth: false,
            title: '问答管理',
            noAuthor: true, //是否需要权限

            sideBar: true
          }
        }, {
          path: 'questionAnswerManagement/addEditQuestionAnswerPage',
          component: chunk.newOperationsCenter('materialManagement/questionAnswerManagement/addEditQuestionAnswerPage'),
          name: 'addEditQuestionAnswerPage',
          meta: {
            auth: false,
            title: '新增问答',
            parentPath: '/operationsCenter/materialManagement/questionAnswerManagement/index'
          }
        }, {
          path: 'questionAnswerManagement/viewQuestionAnswerPage',
          component: chunk.newOperationsCenter('materialManagement/questionAnswerManagement/viewQuestionAnswerPage'),
          name: 'viewQuestionAnswerPage',
          meta: {
            auth: false,
            title: '查看问答',
            noAuthor: true, //是否需要权限
            parentPath: '/operationsCenter/materialManagement/questionAnswerManagement/index'
          }
        }]
      },
      {
        path: 'materialReview',
        component: () => import('@pages/middleView.vue'),
        meta: {
          auth: false,
          title: '素材审核',
          sideBar: true
        },
        children: [{
          path: 'articleReview/articleReview',
          component: chunk.newOperationsCenter('materialReview/articleReview/index'),
          name: 'articleReview',
          meta: {
            auth: false,
            title: '文章审核',
            sideBar: true
          }
        }, {
          path: 'articleReview/viewArticleReview',
          component: chunk.newOperationsCenter('materialReview/articleReview/viewArticleReview'),
          name: 'viewArticleReview',
          meta: {
            auth: false,
            title: '审核文章内容',
            noAuthor: true, //是否需要权限
            parentPath: '/operationsCenter/materialReview/articleReview/articleReview'
          }
        }, {
          path: 'askAnswerReview/index',
          component: chunk.newOperationsCenter('materialReview/askAnswerReview/index'),
          name: 'askAnswerReview',
          meta: {
            auth: false,
            title: '问答审核',
            sideBar: true,
          }
        }, {
          path: 'askAnswerReview/viewAskAnswerReview',
          component: chunk.newOperationsCenter('materialReview/askAnswerReview/viewAskAnswerReview'),
          name: 'viewAskAnswerReview',
          meta: {
            auth: false,
            title: '审核问答内容',
            noAuthor: true, //是否需要权限
            parentPath: '/operationsCenter/materialReview/askAnswerReview/index'

          }
        }]
      },
      {
        path: 'buildingCheckcenter',
        component: () => import('@pages/middleView.vue'),
        name: 'buildingCheckcenter',
        meta: {
          auth: false,
          title: '楼盘审核',
          sideBar: true
        },
        children: [{
            path: 'firstlevelCheckcenter',
            component: () => import("@pages/operationsCenter/buildingCheckcenter/firstlevelCheckcenter.vue"),
            name: 'firstlevelCheckcenter',
            meta: {
              auth: false,
              title: '一级审核',
              sideBar: true
            },
          },
          {
            path: 'secondlevelCheckcenter',
            component: () => import("@pages/operationsCenter/buildingCheckcenter/secondlevelCheckcenter.vue"),
            name: 'secondlevelCheckcenter',
            meta: {
              auth: false,
              title: '二级审核',
              sideBar: true
            },
          },
          {
            path: 'buildingCheckcenterMess',
            component: () => import("@pages/operationsCenter/buildingCheckcenter/buildingCheckcenter.vue"),
            name: 'buildingCheckcenterMess',
            meta: {
              auth: false,
              title: '审核-楼盘',
              sideBar: false
            },
          }
        ]
      },

    ]
  },
  //系统管理
  {
    path: '/system_center',
    component: () => import('@pages/middleView.vue'),
    meta: {
      title: '系统管理',
      icon: "md-cube",
      sideBar: true
    },
    children: [{
        path: 'organization/organList',
        name: 'organList',
        component: chunk.system_center("organization/organList.vue"),
        meta: {
          title: '组织管理 ',
          sideBar: true
        },
      },
      {
        path: 'roleControl/roleList',
        name: 'roleList',
        component: chunk.system_center('roleControl/roleList.vue'),
        meta: {
          title: '角色管理',
          sideBar: true
        },
      },
      {
        path: 'roleControl/roleControling',
        name: 'roleControling',
        component: chunk.system_center('roleControl/roleControling.vue'),
        meta: {
          title: '角色权限配置',
          sideBar: false,
          parentPath: '/system_center/roleControl/roleList'
        },
      },
    ]
  },
  // 营销管理
  {
    path: '/marketing_center',
    name: 'marketingCenter',
    component: () => import('@pages/middleView.vue'),
    meta: {
      title: '营销管理',
      icon: "md-pie",
      sideBar: true
    },
    children: [{
      path: 'propertyReport/index',
      name: 'buildingConfig',
      component: chunk.marketingCenter('propertyReport/index.vue'),
      meta: {
        title: '置业报告',
        sideBar: true
      },
    }]
  },
  //配置管理;
  {
    path: '/configure_center',
    component: () => import('@pages/middleView.vue'),
    meta: {
      title: '配置管理',
      icon: "md-settings",
      sideBar: true
    },
    children: [{
        path: 'teamConfig/teamConfig',
        name: 'teamConfig',
        component: () => import('@pages/configure_center/teamConfig/teamConfig.vue'),
        meta: {
          title: '团队配置',
          sideBar: true
        },
      },
      {
        path: 'teamConfig/teamList',
        name: 'teamList',
        component: () => import('@pages/configure_center/teamConfig/teamList.vue'),
        meta: {
          title: '团队列表',
          parentPath: '/configure_center/teamConfig/teamConfig'
        },
      },
      {
        path: 'channel/channelList',
        name: 'channelList',
        component: () => import('@pages/configure_center/channel/channelList.vue'),
        meta: {
          title: '城市渠道配置',
          sideBar: true,
        },
      },
      {
        path: 'channel/caseChannelList',
        name: 'caseChannelList',
        component: () => import('@pages/configure_center/channel/caseChannelList.vue'),
        meta: {
          title: '案场渠道配置',
          sideBar: true,
        },
      },
      {
        path: 'standBook/standBookList',
        name: 'standBookList',
        component: () => import('@pages/configure_center/standBook/standBookList.vue'),
        meta: {
          title: '台账设置',
          sideBar: true,
        },
      }
    ]
  },
  //配置管理
  {
    path: '/dataManagement_center',
    component: () => import('@pages/middleView.vue'),
    meta: {
      title: '数据管理',
      icon: "md-settings",
      sideBar: true
    },
    children: [{
        path: 'personalClueData/index',
        name: 'personalClueData',
        component: chunk.dataManagementCenter('personalClueData/index.vue'),
        meta: {
          title: '个人线索数据',
          sideBar: true
        },
      },
      {
        path: 'realEstateClueData/index',
        name: 'realEstateClueData',
        component: chunk.dataManagementCenter('realEstateClueData/index.vue'),
        meta: {
          title: '楼盘线索数据',
          sideBar: true,
        },
      },
      {
        path: 'channelClueData/index',
        name: 'channelClueData',
        component: chunk.dataManagementCenter('channelClueData/index.vue'),
        meta: {
          title: '渠道线索数据',
          sideBar: true,
        },
      }
    ]
  }
]
export default router;